The present invention provides a front end, portable true random number generator (TRNG) based on a physical source. Digital images of a broad classification are processed with minimal post-processing which pass DIEHARD, NIST, and ENT protocol tests.
Considerable effort has been afforded in the history of mankind to generate random numbers or their derivatives. Card shuffling, random coin tosses, drawing of various lengths of straws, tumbling objects, spinning wheels and other means have been used to avoid biases in decision making processes. More modern approaches to random number generation may be classified by the methods used to obtain them. Deterministic pseudorandom number generation has been often used as the result of increased availability and power of computers and microcomputers. Physical random number generators have been developed using quantum noise from radioactive decay sources, electronic noise, thermal noise from resistors, avalanche noise from reversed biased diodes, and state interruption of high-speed oscillators by external events.
Two interrelated concerns are of prime importance in the generation of random sequences. First, there should be no bias in frequency, periodicity and locality. Second, the sequences should not be predictable and should be impervious to discovery. The first issue pertains primarily to the use of random numbers in simulation, experimental design and assignment applications. The second concern of resistance to discovery is important in all cryptographic applications and security systems.
The main problems with pseudorandom generators are the necessity to randomly seed the process, the limited cycle period before repetition and the quality of the sequences. Good physical systems appear to be more robust than pseudorandom or mathematically based procedures. The problem with physical systems is often their complexity and portability. Hybrid systems are sometimes used where a physical source generates a finite length random seed for a pseudorandom number generator, which greatly increases the rate of random number generation.
One physical source of random noise is the digitization of images from a chaotic source such as digital images or videos from scenes depicting continuous flow in an embodiment such as a lava lamp. LavaRand was issued as U.S. Pat. No. 5,732,138 to Noll, Mende, and Sisodiya on Mar. 28, 1998. This method is slow and cumbersome and is used primarily to seed a pseudorandom number generator. A modification of this system named, LavaRnd, by Noll and Cooper improves on the speed of LavaRand by using a digitized image from a webcam. However, this implementation depends highly on ad hoc conditions such as complete darkness, stable high ambient temperature and amplification parameters to maximize noise.
The present invention obviates the physical limitations of the prior art by requiring few special environmental conditions. It is extremely robust in the categories of images chosen, is undiscoverable and is embeddable in standalone devices. The true random number generator of the present invention isolates random noise associated with the least significant bits in the digital samples. The invention thus uses widely available off-the-shelf hardware such as smartphones, cameras, scanners, single lens photo transducers and others, which are extensibly portable. A preferred embodiment of the present invention is any type of smartphone or general computing device with access to digitized images. Users of the invention have an easily accessible user-defined entropy pool.
The preferred present implementation using 8-bit digital samples for each color considers only the least significant bit (LSB) of one or more of the color guns in weighted and non-weighted functions. Prior applications that have used digitized images have assumed that the raw output is not random but needs substantial corrective measures. In part, the difficulty with the preceding art is the use of all the information in the eight bits or even n-bit patterns associated with each pixel in an image to generate random seeds. In the analysis of random informational changes in chaotic sources, higher bits would be most likely not to change in subsequent spatial or temporal samples. As an example, triple 8-bit pixels (24 bit RGB) sampled a first time may be inter-related with a second sample. This interdependence would even be present within a pixel sample from the real world. More green may mean less red and blue or any possible combinations thereof. Tests conducted by the Applicant show that concatenating the stream of lowest significant bits independently from each of the guns does not meet the requirements of a TRNG.
Nielsen, in his 1998 U.S. Pat. No. 5,774,549, has considered the use of the information contained in the LSB of digital videos for random seed generation akin to prior art in the design of hardware generators such as used by Wilber, U.S. Pat. No. 6,764,364, but has not considered or analyzed this source as a TRNG. Lang et al. (2009) have used the LSB from digitized images to generate a stream of random bits. However their method requires a raw image that crucially involves the inhibition of lossy compression in a webcam, which restricts its use with modern technology.
A novel feature of this invention is to extract microstructure noise and errors inherent in the digitizing and quantization process of images to generate a stream of true random bits. The inventive process can use raw images or lossy compressed images such as JPEG. The results show that, given a reasonably micro-structured pattern such as a wall, popcorn ceiling, a rock formation, ocean waves, that the stream of bits generated from the state of the least significant bit, represents a true random sequence. The rate of generation of the random bits is substantial. As an example, the rate for a 5 megabyte camera such as the IPHONE® 4 is 0.25 to 1.00 proportion of the pixel capacity of the digitized image, e.g. 1-5 megabits per image, which renders unnecessary the need for subsequent processing such as seeding of a deterministic pseudorandom number generator. Accordingly, this process obviates prior art difficulties by retaining the most important contributors of random noise, the microstructure of the images and quantization noise in the lowest significant bits of the digitized sample.